import { _decorator, Component, Node } from 'cc';
const { ccclass, property } = _decorator;

@ccclass('userInfo')
export class userInfo extends Component {
    public room_id;             //房间ID
    public user_head_url        //头像URL
    public user_id              //用户ID
    public user_name            //用户昵称
    public user_room_cards      //用户房卡数量
    static instance: any;       //用与保存对象实例
    public m_seatIndex;
    public static getInstance(){
        if(userInfo.instance == null){
            userInfo.instance = new userInfo;
            return  userInfo.instance;
        }else{
            return  userInfo.instance;
        }
    }

    //当我们脚本第一次运行时会触发这个函数
    start() {
        globalThis._userInfo = userInfo.getInstance();
    }

    update(deltaTime: number) {
        
    }
}

